package com.hzh.cusviewdemo.Activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.blankj.utilcode.util.AppUtils;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.hzh.cusviewdemo.Base.BaseActivity;
import com.hzh.cusviewdemo.R;

public class MusicNoticeActivity extends BaseActivity implements View.OnClickListener {

    private ImageView amn_back;
    private ImageView amn_wx;
    private TextView amn_version;

    @Override
    public int getLayout() {
        return R.layout.activity_music_notice;
    }

    @Override
    public void initView() {
        amn_back = findViewById(R.id.amn_back);
        amn_wx = findViewById(R.id.amn_wx);
        amn_version = findViewById(R.id.amn_version);

        amn_back.setOnClickListener(this);
    }

    @Override
    public void initData() {
        amn_version.setText("当前版本：" + AppUtils.getAppVersionName());
    }

    @Override
    public void onClick(View v) {
        if (v == amn_back) {
            finish();
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        Glide.with(this)
                .applyDefaultRequestOptions(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.NONE))
                .load("https://zysapp.oss-cn-beijing.aliyuncs.com/file/appwx.jpg")
                .into(amn_wx);
    }
}